{% load static %}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{% block title %}{% endblock %}</title>
    <link href="{% static 'bootstrap/css/bootstrap.min.css' %}" rel="stylesheet">
    <link href="{% static 'css/cl-css.css' %}" rel="stylesheet">
    <link href="{% static 'font-awesome/css/font-awesome.min.css' %}" rel="stylesheet">
    <link rel="stylesheet" href="{% static 'highlight/styles/railscasts.css' %}">
    <style type="text/css">
        body{
            background: url("../static/img/R-C.gif") no-repeat center center fixed;
                    /*兼容浏览器版本*/
                    -webkit-background-size: cover;
                    -o-background-size: cover;
                    background-size: cover;
                    height: 100%;
                    width: 100%;
        }
        div{
            opacity: 1 ;
            {#background-color:rgba(255,255,255,0.5);#}
        }
	</style>
</head>
<body background="../static/img/R-C.gif">
<div id="app">
    {#导航栏#}
    <div class="cl-header container-fluid">
        <div class="header-content container">
            <nav class="navbar navbar-expand-lg navbar-light">
                <a class="navbar-brand" href="/">
                    <img src="../static/img/kdlk.jpg" width="144" height="72" alt="">
                </a>
                <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav"
                        aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>
                <div class="collapse navbar-collapse justify-content-end" id="navbarNav">
                    <ul class="navbar-nav">
                        {% for cat in categories %}
                            {% if cat.id == category.id %}
                                <li class="nav-item active">
                                    <a class="nav-link" href="/?cat_id={{ cat.id }}">{{ cat.title }}</a>
                                </li>
                            {% else %}
                                <li class="nav-item">
                                    <a class="nav-link" href="/?cat_id={{ cat.id }}">{{ cat.title }}</a>
                                </li>
                            {% endif %}
                        {% endfor %}
                        <li class="nav-item dropdown" v-if="is_login">
                            <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
                               data-toggle="dropdown" aria-expanded="false">
                                {{ username }}
                            </a>
                            <div class="dropdown-menu" aria-labelledby="navbarDropdown">
                                <a class="dropdown-item" href="{% url 'users:writeblog' %}">写文章</a>
                                <a class="dropdown-item" href="{% url 'users:usercenter' %}">个人信息</a>
                                <div class="dropdown-divider"></div>
                                <a class="dropdown-item" href="{% url 'users:logout' %}">退出</a>
                            </div>
                        </li>
                        <li class="nav-item" v-else>
                            <a href="{% url 'users:login' %}" class="nav-link">登录</a>
                        </li>
                    </ul>
                </div>
            </nav>
        </div>
    </div>
    {#内容#}
    <div class="cl-cantainer container">
        <div class="row">
            {#        内容左侧#}
            {% block content_left %}

            {% endblock %}
            {#        内容右侧#}
            <div class="col-md-3 cl-right">
                <div class="right-card">

                    <div class="right-card-main">
                        <div class="right-card-title">
                            <h2>公司简介:</h2>
                            凯迪拉克（Cadillac），美国通用汽车旗下世界著名豪华汽车品牌，1902年（壬寅年）
                            诞生于被誉为美国汽车之城的底特律，
                            一百多年来，凯迪拉克汽车在行业车内创造了无数个第一，缔造了无数个豪华车的行业标准。
                            被一向以追求极致尊贵著称的伦敦皇家汽车俱乐部冠以“世界标准”的美誉。
                        </div>
                        <div class="cl-code">
{#                            <img src="../static/temporary-img/4.jpg" class="img-fluid" alt="">#}
                            <p>尊贵的凯迪拉克车主欢迎您</p>
                        </div>

                    </div>
                </div>

                <div class="right-card">

                    <div class="right-card-main">
                        <div class="right-card-title">最新文章</div>
                        <ul class="right-recommended-list">
                            {% for new_art in new_arts %}
                                <li><a href="{% url 'home:detail' %}?art_id={{ new_art.id }}">
                                    <i class="fa fa-angle-right" aria-hidden="true"></i>{{ new_art.title }}
                                </a></li>
                            {% endfor %}
                        </ul>
                    </div>
                </div>

                <div class="right-card">

                    <div class="right-card-main">
                        <div class="right-card-title">热门标签</div>
                        <ul class="label">
                            {% for hot_tag in hot_tags %}
                                <li><a href="{% url 'home:detail' %}?art_id={{ hot_tag.id }}">{{ hot_tag.tags }}</a>
                                </li>
                            {% endfor %}
                        </ul>
                    </div>
                </div>

            </div>
        </div>
    </div>

</div>
<script src="{% static 'jquery/jquery.min.js' %}"></script>
<script src="{% static 'bootstrap/js/bootstrap.min.js' %}"></script>
<script src="{% static 'highlight/highlight.pack.js' %}"></script>
<script>hljs.initHighlightingOnLoad();</script>
{% block js %}

{% endblock %}
<script src="{% static 'js/common.js' %}"></script>
<script src="{% static 'js/host.js' %}"></script>
<script src="{% static 'vue/vue-2.5.16.js' %}"></script>
<script src="{% static 'vue/axios-0.18.0.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/index.js' %}"></script>
</body>
</html>